<template>
  <basic-container :btnFlag=true>
    <div class="card-border">
      <card-header :header-data="headerData"></card-header>
      <!-- 搜索栏 -->
      <form class="el-form el-form--inline avue-crud__search" style="margin: 14px 0px -7px 15px">
        <div class="el-form-item">
          <label class="el-form-item__label">规划名称:</label>
          <div class="el-form-item__content">
            <el-input v-model="plantitle" size="small" placeholder="请输入规划名称" clearable></el-input>
          </div>
        </div>
        <div class="el-form-item avue-crud__searchMenu">
          <div class="el-form-item__content">
            <el-button class="myBtn" type="primary" icon="el-icon-search" @click.stop="searchSubmit()">搜索</el-button>
            <el-button class="myBtn" type="reset" icon="el-icon-delete" @click.stop="resetSubmit()">重置</el-button>
            <!--<el-button type="warning" size="small" @click.stop="searchSubmit()">查询</el-button>-->
          </div>
        </div>
      </form>
      <div class="card-body">
        <el-table
          :data="tableData"
          style="width: 100%"
          row-key="showId"
          :row-class-name="tableRowClassName"
          border
          default-expand-all
          :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
          ref="adjustTreeTable">
          <el-table-column
            align="left"
            prop="mainTitle"
            label="规划名称"
            width="300">
            <template slot-scope="scope">
              <span v-if="scope.row.isRevise">{{scope.row.mainTitle}}</span>
              <a style="cursor:pointer;" @click="detailDialog(scope.row.achievementId,scope.row.pmuc)" v-if="!scope.row.isRevise">{{scope.row.mainTitle}}</a>
            </template>
          </el-table-column>
          <el-table-column
            align="center"
            prop="content"
            label="调整建议">
          </el-table-column>
          <el-table-column
            align="center"
            prop="createTime"
            label="起草日期"
            width="120"
            :formatter="formatterTime">
          </el-table-column>
          <el-table-column
            align="center"
            width="240">
            <template slot="header" slot-scope="scope">
              <span>操作</span>
            </template>
            <template slot-scope="scope">
              <div class="menu-title" @click.stop="reportOpinionHistory(scope.row,scope.index)"
                   v-if="scope.row.isRevise&& scope.row.state!='0'">
                <i class="iconfont iconview icon-primary"></i>
                <p class="menu-title-text">流程进度</p>
              </div>
              <div class="menu-title" @click.stop="submitReportOpinion(scope.row,'1')"
                   v-if="!scope.row.isRevise && scope.row.reviseId==null">
                <i class="iconfont iconview icon-primary"></i>
                <p class="menu-title-text">起草调整建议</p>
              </div>
              <div class="menu-title" @click.stop="askOpinion(scope.row,scope.index)"
                   v-if="scope.row.isRevise && scope.row.state!='7'&& scope.row.state=='0'">
                <i class="iconfont iconview icon-primary"></i>
                <p class="menu-title-text">征求意见</p>
              </div>
              <div class="menu-title" @click.stop="askOpinion(scope.row,scope.index)"
                   v-if="scope.row.isRevise && scope.row.state!='7'&& scope.row.state!='0'">
                <i class="iconfont iconview icon-primary"></i>
                <p class="menu-title-text">查看反馈</p>
              </div>
              <div class="menu-title" @click.stop="submitReportOpinion(scope.row,'2')"
                   v-if="scope.row.isRevise && scope.row.state!='7'&& scope.row.state=='0'">
                <i class="iconfont iconalter icon-warning"></i>
                <p class="menu-title-text">修改调整建议</p>
              </div>
              <div class="menu-title" @click.stop="submitReportOpinion(scope.row,'3')"
                   v-if="scope.row.isRevise && scope.row.state!='7' && scope.row.state=='0'">
                <i class="iconfont iconalter icon-warning"></i>
                <p class="menu-title-text">上报调整建议</p>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <div>
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :page-sizes="[1, 2, 5, 10, 20, 30, 40 ,50]"
            :current-page="page.currentPage"
            :page-size="page.pageSize"
            :total="page.total"
            layout="total, sizes, prev, pager, next, jumper"
            class="paginationcss">
          </el-pagination>
        </div>
      </div>
      <el-dialog :title="reportOpinionFormTitle" :visible.sync="dialogVisible" width="800px">
        <el-form
          label-width="130px"
          :model="reportOpinionForm"
          style="padding-right: 30px;"
          :rules="reportOpinionFormRules"
          ref="reportOpinionForm"
        >
          <el-row>
            <el-col :span="22">
              <el-form-item class="form-item" label="调整建议名称 1:" prop="reviseName">
                <el-input v-model="reportOpinionForm.reviseName" placeholder="请输入调整建议名称"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="22">
              <el-form-item class="form-item" label="调整内容 :" prop="content">
                <el-input
                  type="textarea"
                  :autosize="{ minRows: 4, maxRows: 4}"
                  placeholder="请输入调整内容"
                  v-model="reportOpinionForm.content"
                ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="opinionFiles">
            <el-col :span="22">
              <el-form-item class="form-item" label="相关附件 :">
                <div v-for="item in reportOpinionFile" :key="item">
                  <el-link :href="'/planning/file/download/'+item.fileId" type="danger"
                  >{{item.fileName}}
                  </el-link>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="opinionFilesInform">
            <el-col :span="22">
              <el-form-item class="form-item" label="相关附件:" :required="true">
                <el-upload
                  class="upload-demo"
                  ref="uploadrelated"
                  action="string"
                  :http-request="submitUploadMixin"
                  :on-preview="handlePreviewMixin"
                  :on-remove="handleRemoveMixin"
                  :file-list="fileListMixin"
                  :auto-upload="true"
                  :on-change="fileChangeMixin">
                  <el-button slot="trigger" size="small" type="primary">点击上传</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" :disabled="isDisabled" @click="comitYes()">{{comitBtnName}}</el-button>
          <el-button @click="cancel()">取 消</el-button>
        </div>
      </el-dialog>
      <el-dialog title="流程进度" :visible.sync="dialogVisibleHistory" width="1000px">
        <div class="step-group" style="margin: 35px 20px 1px;">
          <el-steps :active="historyActive">
            <el-step :title="reportStep"
                     icon="el-icon-edit"></el-step>
            <el-step title="政府"
                     icon="el-icon-edit"
                     class="transform-deg_two"></el-step>
            <el-step title=""
                     icon="el-icon-edit"
                     class="transform-deg_line_two"
                     :class="{'isblack':stateControlBlack == '0'}"></el-step>
            <el-step title="省委"
                     icon="el-icon-upload"
                     class="beian_two"
                     :class="{'isActive':stateControlColor == '0'}"></el-step>
            <el-step title="人大"
                     icon="el-icon-upload"
                     style="margin-left: -183px;"></el-step>
            <el-step title="政府印发"
                     icon="el-icon-upload"></el-step>
          </el-steps>
        </div>
        <avue-crud :data="historyData"
                   :option="option"
                   :table-loading="tableLoadingHistory"
                   @on-load="getToDoList"
                   class="avuecrud">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleHistory=false">关 闭</el-button>
        </div>
      </el-dialog>
      <el-dialog title="流程进度" :visible.sync="dialogVisibleImportant" width="1000px">
        <div class="step-group" style="margin: 20px;margin-bottom: 1px;">
          <el-steps :active="historyActive">
            <el-step :title="reportStep" icon="el-icon-edit"></el-step>
            <el-step title="发改" icon="el-icon-upload"></el-step>
            <el-step title="政府" icon="el-icon-edit"></el-step>
            <!--<el-step title="修改分解方案" icon="el-icon-picture" v-if="editDraftView"></el-step>-->
            <el-step title="印发" icon="el-icon-upload"></el-step>
          </el-steps>
        </div>
        <avue-crud :data="historyData"
                   :option="option"
                   :table-loading="tableLoadingHistory"
                   @on-load="getToDoList"
                   class="avuecrud">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleImportant=false">关 闭</el-button>
        </div>
      </el-dialog>
      <el-dialog title="流程进度" :visible.sync="dialogVisibleDevelopOpinion" width="1000px">
        <div class="step-group" style="margin: 20px;margin-bottom: 1px;">
          <el-steps :active="historyActive">
            <el-step :title="reportStep" icon="el-icon-edit"></el-step>
            <el-step title="发改" icon="el-icon-upload"></el-step>
            <el-step title="政府" icon="el-icon-edit"></el-step>
            <!--<el-step title="修改分解方案" icon="el-icon-picture" v-if="editDraftView"></el-step>-->
            <!--<el-step title="印发" icon="el-icon-upload"></el-step>-->
          </el-steps>
        </div>
        <avue-crud :data="historyData"
                   :option="option"
                   :table-loading="tableLoadingHistory"
                   @on-load="getToDoList"
                   class="avuecrud">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleDevelopOpinion=false">关 闭</el-button>
        </div>
      </el-dialog>
      <el-dialog title="流程进度" :visible.sync="dialogVisibleCommon" width="1000px">
        <div class="step-group" style="margin: 20px;margin-bottom: 1px;">
          <el-steps :active="historyActive">
            <el-step :title="reportStep" icon="el-icon-edit"></el-step>
            <el-step title="发改" icon="el-icon-upload"></el-step>
            <!--<el-step title="修改分解方案" icon="el-icon-picture" v-if="editDraftView"></el-step>-->
            <el-step title="印发" icon="el-icon-upload"></el-step>
          </el-steps>
        </div>
        <avue-crud :data="historyData"
                   :option="option"
                   :table-loading="tableLoadingHistory"
                   @on-load="getToDoList"
                   class="avuecrud">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleCommon=false">关 闭</el-button>
        </div>
      </el-dialog>
      <el-dialog title="流程进度" :visible.sync="dialogVisibleRecord" width="1000px">
        <div class="step-group" style="margin: 20px;margin-bottom: 1px;">
          <el-steps :active="historyActive">
            <el-step :title="reportStep" icon="el-icon-edit"></el-step>
            <!--<el-step title="修改分解方案" icon="el-icon-picture" v-if="editDraftView"></el-step>-->
            <el-step title="印发" icon="el-icon-upload"></el-step>
          </el-steps>
        </div>
        <avue-crud :data="historyData"
                   :option="option"
                   :table-loading="tableLoadingHistory"
                   @on-load="getToDoList"
                   class="avuecrud">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleRecord=false">关 闭</el-button>
        </div>
      </el-dialog>
      <detail-dialog :achievementId="achievementIdDD"
                     :pmuc="pmucDD"
                     :showDetailDialog.sync="showDetailDialog"
                     :key="achievementIdDD"></detail-dialog>
    </div>
  </basic-container>
</template>

<script>
  import {getSubjectList} from "@/api/subject";
  import {Subject_DIC, PROJECT_DIC, REVISE_STATES_DIC} from '@/const/dict'
  import {getReviseAchievementList, submitReportOpinion, getReviseHistory} from "@/api/pim/pim";
  import {creatReportOpinion, editReportOpinion, releaseReportOpinion, getReportOpinionDetail} from "@/api/pim/pim";
  import {reportOpinionFormRules} from "@/const/infoRules";
  import relatedfile from "@/mixins/relatedfile";
  import {getFileTypeFiles} from '@/views/util'

  export default {
    name: "adjustment",
    mixins: [relatedfile],
    created() {
      window.resultDetail = this.resultDetail;
      window.detailDialog = this.detailDialog;
      this.putTableData();
    },
    data() {
      return {
        stateControlColor:'1',
        stateControlBlack:'1',
        headerData: {
          title: '修订调整'
        },
        tableData: [],
        page: {
          total: 0, // 总页数
          currentPage: 1, // 当前页数
          pageSize: 5 // 每页显示多少条
        },
        formatterTime: function (row, value, label, column) {
          if (row.createTime != null) {
            var data = row.createTime.split(' ');
            return data[0];
          }
        },
        reportOpinionForm: {
          achievementId: null,
          content: '',
          contentFileIds: [],
          reviseName: '',
        },
        reportOpinionFormRules: reportOpinionFormRules,
        dialogVisible: false,
        dialogVisibleHistory: false,
        dialogVisibleImportant: false,
        dialogVisibleDevelopOpinion: false,
        dialogVisibleCommon: false,
        dialogVisibleRecord: false,
        reportStep: '报送',
        tableLoadingHistory: false,
        historyData: [],
        option: {
          page: false,
          addBtn: false,
          editBtn: false,
          addRowBtn: false,
          indexLabel: "序号",
          index: true,
          indexWidth:70,
          cellBtn: false,
          delBtn: false,
          columnBtn: false,
          refreshBtn: false,
          filterBtn: false,
          searchBtn: false,
          menuWidth: 100,
          menu: false,
          keyId: "id",
          column: [
            {
              label: "环节名称",
              prop: "taskName",
              cell: true,
              width: 120,
            },
            {
              label: "办理人",
              prop: "assigneeNickname",
              cell: true,
              width: 180,
            },
            {
              label: "相关意见",
              prop: "opinion",
              cell: true,
            },
          ]
        },
        historyActive: null,
        editDraftView: true,
        reportOpinionFormTitle: '起草调整建议',
        comitBtnName: '报 送',
        submitType: null,
        opinionFiles: false,
        opinionFilesInform: false,
        reportOpinionFile: [],
        reviseIdTemp: null,
        isDisabled: false,
        achievementIdDD: null,
        pmucDD: null,
        showDetailDialog: null,
        plantitle: '',
        plantitleLike: ''

      }
    },
    methods: {
      tableRowClassName({row, rowIndex}) {
        if (row.state == undefined) {
          return 'success-row';
        }
        return '';
      },
      detailDialog (achievementId, pmuc) {
        this.achievementIdDD = achievementId;
        this.pmucDD = pmuc;
        this.showDetailDialog = true;
      },
      // 成果详情跳转
      resultDetail(achievementId) {
        let src = `/planning/achievement/detail?id=${achievementId}`;
        this.$router.push({
          path: src
        })
      },
      // 征求意见跳转
      askOpinion(row) {
        let src = `/collectionListRevise/list/${row.reviseId}`;
        this.$router.push({
          path: src,
          query: {
            type: "9",
            title: row.mainTitle,
            state: row.state,
            achievementTitle: row.achievementTitle,
            orgName: row.orgName,
          }
        });
      },
      putTableData(titleLike) {
        getReviseAchievementList(Object.assign({
          current: this.page.currentPage,
          size: this.page.pageSize,
          titleLike:titleLike
        })).then(response => {
          this.tableData = response.data.data.records;
          this.page.total = response.data.data.total;
        })
      },
      pageputTableData(page,params) {
        getReviseAchievementList(Object.assign({
          current: page.currentPage,
          size: page.pageSize,
        },params)).then(response => {
          this.tableData = response.data.data.records;
          this.page.total = response.data.data.total;
        })
      },
      searchSubmit(){
        this.page.currentPage = 1
        this.putTableData(this.plantitle);
        this.plantitleLike= this.plantitle
      },
      resetSubmit(){
        this.plantitle= '';
        this.putTableData()
      },
      handleSizeChange(val) {
        var page = this.page;
        page.pageSize = val;
        var params={titleLike: this.plantitleLike};
        this.pageputTableData(page,params);
      },
      handleCurrentChange(val) {
        var page = this.page;
        page.currentPage = val;
        var params={titleLike: this.plantitleLike};
        this.pageputTableData(page,params);
      },
      getYearAndMonth() {
        var data = new Date();
        let Y = data.getFullYear();
        let M = data.getMonth() + 1;
        return Y + "年" + M + "月"
      },
      submitReportOpinion(row, type) {
        
        if (type == '3') {  //上报
          this.$confirm("确定上报吗?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
          }).then(() => {
            releaseReportOpinion(row.reviseId).then(response => {
              if (response.data.code == 0) {
                this.$notify({
                  title: "成功",
                  message: "上报成功",
                  type: "success",
                  duration: 2000
                });
                this.$router.go(0);
              }
            })
          });
          return;
        }
        this.dialogVisible = true;
        this.reportOpinionForm.reviseName = '';
        this.reportOpinionForm.content = '';
        this.reportOpinionForm.contentFileIds = [];
        this.fileListMixin = [];
        this.reportOpinionForm.achievementId = row.achievementId;
        this.submitType = type;
        this.reviseIdTemp = row.reviseId;
        switch (type) {
          case '1':
            this.reportOpinionForm.reviseName = '《' + row.mainTitle + '》' + '修订调整建议' + '(' + this.getYearAndMonth() + ')';
            this.reportOpinionFormTitle = '起草调整建议';
            this.comitBtnName = '起 草';
            this.opinionFiles = false;
            this.opinionFilesInform = true;
            break;
          case '2':
            this.reportOpinionFormTitle = '修改调整建议';
            this.comitBtnName = '修 改';
            this.opinionFiles = true;
            this.opinionFilesInform = true;
            // this.putReportOpinion(row.reviseId);
            break;
          case '3':
            this.reportOpinionFormTitle = '上报调整建议';
            this.comitBtnName = '上 报';
            this.opinionFiles = true;
            this.opinionFilesInform = false;
            this.putReportOpinion(row.reviseId);
            break;
        }
      },
      //得到调整建议详情
      putReportOpinion(reviseId) {
        getReportOpinionDetail(reviseId).then(async response => {
          var records = response.data.data;
          this.reportOpinionForm.reviseName = records.reviseName;
          this.reportOpinionForm.content = records.content;
          this.reportOpinionForm.contentFileIds = await records.contentFileIds;
          let files = await getFileTypeFiles(records.contentFileIds);
          this.reportOpinionFile = files;
        })
      },
      cancel() {
        this.dialogVisible = false;
      },
      comitYes() {
        var arr = [];
        for (var item in this.fileListMixin) {
          arr.push(this.fileListMixin[item].url);
        }
        this.reportOpinionForm.contentFileIds = arr;

        if (this.reportOpinionForm.contentFileIds.length == 0) {
          this.$notify({
            title: "提醒",
            type: "warning",
            message: "请上传相关附件",
            duration: 2000
          });
          return;
        }
        this.$refs.reportOpinionForm.validate(valid => {
          if (valid) {
            this.$confirm("确定报送吗?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning"
            }).then(() => {
              this.isDisabled = true;
              if (this.submitType == '1') {  //起草
                creatReportOpinion(this.reportOpinionForm).then(response => {
                  if (response.data.code == 0) {
                    this.$notify({
                      title: "成功",
                      message: "起草成功",
                      type: "success",
                      duration: 2000
                    });
                    this.$router.go(0);
                  }
                })
              } else if (this.submitType == '2') {  //修改
                editReportOpinion(this.reviseIdTemp, this.reportOpinionForm).then(response => {
                  if (response.data.code == 0) {
                    this.$notify({
                      title: "成功",
                      message: "修改成功",
                      type: "success",
                      duration: 2000
                    });
                    this.$router.go(0);
                  }
                })
              }
            })
          }
        })
      },
      reportOpinionHistory(row) {
        if (row.category == 'A' && !row.havModifyOpinion) {
          this.adjustDevelop(row);
        } else if ((row.category == 'B' || row.category == 'C') && row.planningRank == 'A') {
          this.adjustImportant(row)
        } else if (row.category == 'B' && row.planningRank == 'B') {
          this.adjustCommon(row)
        } else if (row.category == 'A' && row.havModifyOpinion) {
          if (row.automatic == '0') {
            this.adjustDevelop(row);
          } else {
            //是自动发起的
            this.adjustDevelopOpinion(row)
          }
        } else if (row.category == 'B' && row.planningRank == 'C') {
          this.adjustRecord(row)
        }
      },
      adjustDevelop(row) {
        this.editDraftView = true;
        if (!row.decomposeDraftId || row.decomposeDraftId == null) {
          this.editDraftView = false;
        }
        this.dialogVisibleHistory = true;
        switch (row.state) {
          case '1':
            this.historyActive = 1;
            this.reportStep = '报送（修改重报）';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
          case '2':
            this.historyActive = 1;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '0';
            break;
          case '3':
            this.historyActive = 3;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
          case '24':
            this.historyActive = 1;
            this.reportStep = '报送';
            this.stateControlColor = '0';
            this.stateControlBlack = '0';
            break;
          case '4':
            this.historyActive = 4;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
          case '5':
            this.historyActive = 10;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
          case '6':
            this.historyActive = 10;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
          case '7':
            this.historyActive = 10;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
          case '16':
            this.historyActive = 5;
            this.reportStep = '报送';
            this.stateControlColor = '1';
            this.stateControlBlack = '1';
            break;
        }
        this.getReviseHistory(row.reviseId);
      },
      adjustImportant(row) {
        this.editDraftView = true;
        if (!row.decomposeDraftId || row.decomposeDraftId == null) {
          this.editDraftView = false;
        }
        this.dialogVisibleImportant = true;
        switch (row.state) {
          case '11':
            this.historyActive = 1;
            this.reportStep = '报送（修改重报）';
            break;
          case '8':
            this.historyActive = 1;
            this.reportStep = '报送';
            break;
          case '9':
            this.historyActive = 2;
            this.reportStep = '报送';
            break;
          case '10':
            this.historyActive = 3;
            this.reportStep = '报送';
            break;
          case '7':
            this.historyActive = 6;
            this.reportStep = '报送';
            break;
          case '17':
            this.historyActive = 2;
            this.reportStep = '报送';
            break;
        }
        this.getReviseHistory(row.reviseId);
      },
      adjustDevelopOpinion(row) {
        this.editDraftView = true;
        if (!row.decomposeDraftId || row.decomposeDraftId == null) {
          this.editDraftView = false;
        }
        this.dialogVisibleDevelopOpinion = true;
        switch (row.state) {
          case '21':
            this.historyActive = 1;
            this.reportStep = '报送';
            break;
          case '22':
            this.historyActive = 2;
            this.reportStep = '报送';
            break;
          case '23':
            this.historyActive = 3;
            this.reportStep = '报送';
            break;
          case '7':
            this.historyActive = 6;
            this.reportStep = '报送';
            break;
        }
        this.getReviseHistory(row.reviseId);
      },
      adjustCommon(row) {
        this.editDraftView = true;
        if (!row.decomposeDraftId || row.decomposeDraftId == null) {
          this.editDraftView = false;
        }
        this.dialogVisibleCommon = true;
        switch (row.state) {
          case '14':
            this.historyActive = 1;
            this.reportStep = '报送（修改重报）';
            break;
          case '12':
            this.historyActive = 1;
            this.reportStep = '报送';
            break;
          case '13':
            this.historyActive = 2;
            this.reportStep = '报送';
            break;
          case '7':
            this.historyActive = 5;
            this.reportStep = '报送';
            break;
          case '18':
            this.historyActive = 1;
            this.reportStep = '报送';
            break;
        }
        this.getReviseHistory(row.reviseId);
      },
      adjustRecord(row) {
        this.editDraftView = true;
        if (!row.decomposeDraftId || row.decomposeDraftId == null) {
          this.editDraftView = false;
        }
        this.dialogVisibleRecord = true;
        switch (row.state) {
          case '15':
            this.historyActive = 1;
            this.reportStep = '报送';
            break;
          case '19':
            this.historyActive = 1;
            this.reportStep = '报送';
            break;
          case '7':
            this.historyActive = 5;
            this.reportStep = '报送';
            break;
        }
        this.getReviseHistory(row.reviseId);
      },
      getReviseHistory(reviseId) {
        getReviseHistory(Object.assign({
          reviseId: reviseId,
        })).then(response => {
          this.historyData = response.data.data;
        })
      },
      getToDoList() {

      },


    }
  }
</script>

<style lang="scss" scoped>
  .transform-deg_two {
    /deep/.el-step__line {
      transform: rotate(-21deg);
      margin-top: -29px;
    }
  }
  .transform-deg_line_two {
    margin-left: -184px;

    /deep/.el-step__line {

    }
  }

  .beian_two {
    margin-top: -77px;
    margin-left: 8px;

    /deep/.el-step__line {
      display: none;
    }
  }

  .isActive{
    /deep/ .el-step__title.is-wait{
      color: #67c23a;
    }
    /deep/ .el-step__head.is-wait{
      color: #67c23a;
    }
  }

  .isblack{
    /deep/ .el-step__title.is-wait{
      color: black;
    }
    /deep/ .el-step__head.is-wait{
      color: black;
    }
  }
  .card-body {
    padding: 10px;
    min-height: 400px;
  }

  .form-item {
    font-weight: 600;
  }

  .paginationcss {
    margin-top: 20px;
    float: right;
    margin-right: 28px;
  }
  .myBtn{
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 3px;
  }
</style>
